<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of wrapper
 *
 * @author laimis
 */
class UserWrapper {
     public function wraperController(){
        $actionObject = $this->getRequestAction();
        if($actionObject != null){
            switch ($actionObject) {
                case 'login':
                    include_once BASEURL.'action/user/login/wrapper.php';
                    new LoginWrapper();
                    break;
                case 'logout':
                    include_once BASEURL.'action/user/logout.php';
                    new UserLogout();
                    break;
                default:
            include_once BASEURL.'web/error.php';
                    exit ();
                    break;
            }
        }else{
            include_once BASEURL.'web/error.php';
                    exit ();
        }
    }

    public function getRequestAction(){
        $result = '';
        if(isset ($_REQUEST['request']['action'])){
            $result = $_REQUEST['request']['action'];
        }
        return $result;
    }

    public function UserWrapper(){
        $this->wraperController();
    }
}
?>
